package com.basic.auth.service;


import com.basic.auth.controller.req.AuthRoleMemberReqForm;
import com.basic.auth.domain.AuthRoleMemberBo;
import com.basic.common.result.WebResult;

import java.util.List;

/**
 * 用户角色管理
 *
 * @author lpp
 * @version 1.0
 * @Date 2018/8/14 9:45
 */
public interface AuthRoleMemberService {

    /**
     * 查询用户角色关系集合
     *
     * @param roleMemberBo
     * @return java.util.List<com.nxin.middle.basic.auth.domain.AuthRoleMemberBo>
     * @author LPP
     * @date 15:27 2018/8/21
     */
    public List<AuthRoleMemberBo> selListBySysIdSubSysId(AuthRoleMemberBo roleMemberBo);

    /**
     * 分页查询用户与角色
     *
     * @param roleMemberBo
     * @return java.util.List<com.nxin.middle.basic.auth.domain.AuthRoleMemberBo>
     * @author Li Lei
     * @since 2018/12/15 10:30
     */
    public List<AuthRoleMemberBo> selRoleMemberPageList(AuthRoleMemberBo roleMemberBo);

    /**
     * 根据主键id删除用户角色关系
     *
     * @param roleMemberBo
     * @return int
     * @author LPP
     * @date 15:39 2018/8/21
     */
    int delRoleMemberByParam(AuthRoleMemberBo roleMemberBo);

    /**
     * 添加用户角色
     *
     * @param roleMemberBo
     * @return void
     * @author LPP
     * @date 18:40 2018/8/14
     */
    public void addRoleMember(AuthRoleMemberBo roleMemberBo);

    /**
     * 批量添加用户角色
     *
     * @param roleMemberBo
     * @return void
     * @author xumqc
     * @date 18:40 2024/7/8
     */
    public WebResult addBatchRoleMember(AuthRoleMemberBo roleMemberBo);

    /**
     * 条件查询用户角色
     *
     * @param roleMemberBo
     * @return java.util.List<com.nxin.middle.basic.auth.domain.AuthRoleMemberBo>
     * @author Li Lei
     * @since 2019/1/25 15:23
     */
    List<AuthRoleMemberBo> selectByCode(AuthRoleMemberBo roleMemberBo);

    /***
     * 判断用户角色权限
     *
     * @param roleMemberBo
     * @return
     * @author XiaoShuai
     * @since 2019/10/15 10:57
     */
    public WebResult<Boolean> judgeUserFuncByRoleAndCode(AuthRoleMemberBo roleMemberBo);
    /***
     * 确认关联
     * @param roleMemberBo
     * @return
     */
    WebResult confirmAssociation(AuthRoleMemberBo roleMemberBo);

    int countUserByRoleCode(String roleCode);

    WebResult cancelAssociation(AuthRoleMemberReqForm roleMemberReqForm);

    List<String> selRoleListByBoId(String boId);
}
